/**
 * Created with IntelliJ IDEA.
 * User: duoba
 * Date: 16/2/25
 * Time: 上午9:42
 * To change this template use File | Settings | File Templates.
 */

package com.cake21.uitest.Page;

import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import com.cake21.uitest.Constant.Constants;
import com.cake21.uitest.System.Core.Page;

public class IndexPage extends Page {
    /*页面元素*/
    @FindBy(id = "IDheaderlogin")
    private WebElement loginBtn;
    @FindBy(className = "alert_ok")
    private WebElement popupBtn;

    /*载入页面*/
    protected void load() {
        driver.get(Constants.IndexURL);
    }

    /*构造方法*/
    public IndexPage() {

    }

    /*点击进入登录页面*/
    public LoginPage goLogin() {
        this.loginBtn.click();
        return new LoginPage(driver);
    }

    /*弹出框确认*/
    public void confirmPopUpBtn() {
        this.popupBtn.click();
    }

}
